<!--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-->
<html> <!--</html> xmlns="http://www.w3.org/1999/xhtml">-->
<head>
<title>Edit Text</title>

<!-- TinyMCE -->
<script type="text/javascript" src="./js/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
function go() {
  try {
    if (window.parent.TextEdit) {
      var data = window.parent.TextEdit.getCurrentContent();
      //document.forms['myform'].elements['elm1'].value = data;
      tinyMCE.activeEditor.setContent(data);
    }
  } 
  catch (e) {
    alert(e.message);
  }
}


tinyMCE.init({
    mode : "textareas",
    theme : "advanced",
    theme_advanced_buttons1 : "fontselect,fontsizeselect,forecolor,separator,bold,italic,underline,justifyleft,justifycenter,justifyright,justifyfull",
    theme_advanced_buttons2 : "",
    theme_advanced_buttons3 : "",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
	theme_advanced_more_colors : 0,
	setup : function(ed) {
      ed.onInit.add(go);
    }
});


<!-- /TinyMCE -->
</script>

</head>
<body onload="" style="background: white;" >

<form name='myform'>
	<!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
	<textarea id="elm1" name="elm1" rows="15" style="width: 90%">
	</textarea>
	<br />
	<input type="button" name="ok" value="OK" onclick="window.parent.TextEdit.setContent(tinyMCE.activeEditor.getContent())" />
	<input type="button" name="reset" value="Cancel" onclick="window.parent.TextEdit.cancel()"/>
</form>

</body>
</html>
